# Single string with CR/LF throughout the sting
sentence = "the quick\r\nbrown fox\r\njumped over\r\nthe lazy\r\ndog"
lines.gsub(/\r\n?/, " ")
=> "the quick brown fox jumped over the lazy dog"
# Array of strings where the CR/LF or other whitespace is at beginging or end
lines = [" hello ", "\tgoodbye\r\n"]
lines.map(&:strip)
=> ["hello", "goodbye"]